home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / demos / GL / atlantis / shark.c < prev    next >
C/C++ Source or Header  |  1994-08-01  |  36KB  |  1,298 lines

  1. /*
  2.  * Copyright 1992, 1993, 1994, Silicon Graphics, Inc.
  3.  * All Rights Reserved.
  4.  *
  5.  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6.  * the contents of this file may not be disclosed to third parties, copied or
  7.  * duplicated in any form, in whole or in part, without the prior written
  8.  * permission of Silicon Graphics, Inc.
  9.  *
  10.  * RESTRICTED RIGHTS LEGEND:
  11.  * Use, duplication or disclosure by the Government is subject to restrictions
  12.  * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13.  * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14.  * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15.  * rights reserved under the Copyright Laws of the United States.
  16.  */
  17. #include "gl.h"
  18. #include "math.h"
  19. #include "atlantis.h"
  20. #include "fish.h"
  21.  
  22. /* shark */
  23. static float N001[3] = { 0.000000 ,1.000000 ,0.000000};
  24. static float N002[3] = { 0.000077 ,-0.020611 ,0.999788};
  25. static float N003[3] = { 0.961425 ,0.258729 ,-0.093390};
  26. static float N004[3] = { 0.510811 ,-0.769633 ,-0.383063};
  27. static float N005[3] = { 0.400123 ,0.855734 ,-0.328055};
  28. static float N006[3] = { -0.770715 ,0.610204 ,-0.183440};
  29. static float N007[3] = { -0.915597 ,-0.373345 ,-0.149316};
  30. static float N008[3] = { -0.972788 ,0.208921 ,-0.100179};
  31. static float N009[3] = { -0.939713 ,-0.312268 ,-0.139383};
  32. static float N010[3] = { -0.624138 ,-0.741047 ,-0.247589};
  33. static float N011[3] = { 0.591434 ,-0.768401 ,-0.244471};
  34. static float N012[3] = { 0.935152 ,-0.328495 ,-0.132598};
  35. static float N013[3] = { 0.997102 ,0.074243 ,-0.016593};
  36. static float N014[3] = { 0.969995 ,0.241712 ,-0.026186};
  37. static float N015[3] = { 0.844539 ,0.502628 ,-0.184714};
  38. static float N016[3] = { -0.906608 ,0.386308 ,-0.169787};
  39. static float N017[3] = { -0.970016 ,0.241698 ,-0.025516};
  40. static float N018[3] = { -0.998652 ,0.050493 ,-0.012045};
  41. static float N019[3] = { -0.942685 ,-0.333051 ,-0.020556};
  42. static float N020[3] = { -0.660944 ,-0.750276 ,0.015480};
  43. static float N021[3] = { 0.503549 ,-0.862908 ,-0.042749};
  44. static float N022[3] = { 0.953202 ,-0.302092 ,-0.012089};
  45. static float N023[3] = { 0.998738 ,0.023574 ,0.044344};
  46. static float N024[3] = { 0.979297 ,0.193272 ,0.060202};
  47. static float N025[3] = { 0.798300 ,0.464885 ,0.382883};
  48. static float N026[3] = { -0.756590 ,0.452403 ,0.472126};
  49. static float N027[3] = { -0.953855 ,0.293003 ,0.065651};
  50. static float N028[3] = { -0.998033 ,0.040292 ,0.048028};
  51. static float N029[3] = { -0.977079 ,-0.204288 ,0.059858};
  52. static float N030[3] = { -0.729117 ,-0.675304 ,0.111140};
  53. static float N031[3] = { 0.598361 ,-0.792753 ,0.116221};
  54. static float N032[3] = { 0.965192 ,-0.252991 ,0.066332};
  55. static float N033[3] = { 0.998201 ,-0.002790 ,0.059892};
  56. static float N034[3] = { 0.978657 ,0.193135 ,0.070207};
  57. static float N035[3] = { 0.718815 ,0.680392 ,0.142733};
  58. static float N036[3] = { -0.383096 ,0.906212 ,0.178936};
  59. static float N037[3] = { -0.952831 ,0.292590 ,0.080647};
  60. static float N038[3] = { -0.997680 ,0.032417 ,0.059861};
  61. static float N039[3] = { -0.982629 ,-0.169881 ,0.074700};
  62. static float N040[3] = { -0.695424 ,-0.703466 ,0.146700};
  63. static float N041[3] = { 0.359323 ,-0.915531 ,0.180805};
  64. static float N042[3] = { 0.943356 ,-0.319387 ,0.089842};
  65. static float N043[3] = { 0.998272 ,-0.032435 ,0.048993};
  66. static float N044[3] = { 0.978997 ,0.193205 ,0.065084};
  67. static float N045[3] = { 0.872144 ,0.470094 ,-0.135565};
  68. static float N046[3] = { -0.664282 ,0.737945 ,-0.119027};
  69. static float N047[3] = { -0.954508 ,0.288570 ,0.075107};
  70. static float N048[3] = { -0.998273 ,0.032406 ,0.048993};
  71. static float N049[3] = { -0.979908 ,-0.193579 ,0.048038};
  72. static float N050[3] = { -0.858736 ,-0.507202 ,-0.072938};
  73. static float N051[3] = { 0.643545 ,-0.763887 ,-0.048237};
  74. static float N052[3] = { 0.955580 ,-0.288954 ,0.058068};
  75. static float N053[3] = { 0.000000 ,1.000000 ,0.000000};
  76. static float N054[3] = { 0.000000 ,1.000000 ,0.000000};
  77. static float N055[3] = { 0.000000 ,1.000000 ,0.000000};
  78. static float N056[3] = { 0.000000 ,1.000000 ,0.000000};
  79. static float N057[3] = { 0.000000 ,1.000000 ,0.000000};
  80. static float N058[3] = { 0.000050 ,0.793007 ,-0.609213};
  81. static float N059[3] = { 0.913510 ,0.235418 ,-0.331779};
  82. static float N060[3] = { -0.807970 ,0.495000 ,-0.319625};
  83. static float N061[3] = { 0.000000 ,0.784687 ,-0.619892};
  84. static float N062[3] = { 0.000000 ,-1.000000 ,0.000000};
  85. static float N063[3] = { 0.000000 ,1.000000 ,0.000000};
  86. static float N064[3] = { 0.000000 ,1.000000 ,0.000000};
  87. static float N065[3] = { 0.000000 ,1.000000 ,0.000000};
  88. static float N066[3] = { -0.055784 ,0.257059 ,0.964784};
  89. static float N067[3] = { 0.000000 ,1.000000 ,0.000000};
  90. static float N068[3] = { 0.000000 ,1.000000 ,0.000000};
  91. static float N069[3] = { -0.000505 ,-0.929775 ,-0.368127};
  92. static float N070[3] = { 0.000000 ,1.000000 ,0.000000};
  93. static float N071[3] = { -0.987102 ,0.131723 ,-0.090984};
  94. static float N072[3] = { -0.987102 ,0.131723 ,-0.090984};
  95. static float N073[3] = { -0.987102 ,0.131723 ,-0.090984};
  96. static float N074[3] = { 0.000000 ,1.000000 ,0.000000};
  97. static float N075[3] = { 0.000000 ,1.000000 ,0.000000};
  98. static float N076[3] = { 0.000000 ,1.000000 ,0.000000};
  99. static float N077[3] = { 0.995210 ,0.071962 ,-0.066168};
  100. static float N078[3] = { 0.995210 ,0.071962 ,-0.066168};
  101. static float N079[3] = { 0.995210 ,0.071962 ,-0.066168};
  102. static float N080[3] = { 0.000000 ,1.000000 ,0.000000};
  103. static float N081[3] = { 0.000000 ,1.000000 ,0.000000};
  104. static float N082[3] = { 0.000000 ,1.000000 ,0.000000};
  105. static float P001[3] = {           0.00,           0.00,           0.00 };
  106. static float P002[3] = {           0.00,         -36.59,        5687.72 };
  107. static float P003[3] = {          90.00,         114.73,         724.38 };
  108. static float P004[3] = {          58.24,        -146.84,         262.35 };
  109. static float P005[3] = {          27.81,         231.52,         510.43 };
  110. static float P006[3] = {         -27.81,         230.43,         509.76 };
  111. static float P007[3] = {         -46.09,        -146.83,         265.84 };
  112. static float P008[3] = {         -90.00,         103.84,         718.53 };
  113. static float P009[3] = {        -131.10,        -165.92,         834.85 };
  114. static float P010[3] = {         -27.81,        -285.31,         500.00 };
  115. static float P011[3] = {          27.81,        -285.32,         500.00 };
  116. static float P012[3] = {         147.96,        -170.89,         845.50 };
  117. static float P013[3] = {         180.00,           0.00,        2000.00 };
  118. static float P014[3] = {         145.62,         352.67,        2000.00 };
  119. static float P015[3] = {          55.62,         570.63,        2000.00 };
  120. static float P016[3] = {         -55.62,         570.64,        2000.00 };
  121. static float P017[3] = {        -145.62,         352.68,        2000.00 };
  122. static float P018[3] = {        -180.00,           0.01,        2000.00 };
  123. static float P019[3] = {        -178.20,        -352.66,        2001.61 };
  124. static float P020[3] = {         -55.63,        -570.63,        2000.00 };
  125. static float P021[3] = {          55.62,        -570.64,        2000.00 };
  126. static float P022[3] = {         179.91,        -352.69,        1998.39 };
  127. static float P023[3] = {         150.00,           0.00,        3000.00 };
  128. static float P024[3] = {         121.35,         293.89,        3000.00 };
  129. static float P025[3] = {          46.35,         502.93,        2883.09 };
  130. static float P026[3] = {         -46.35,         497.45,        2877.24 };
  131. static float P027[3] = {        -121.35,         293.90,        3000.00 };
  132. static float P028[3] = {        -150.00,           0.00,        3000.00 };
  133. static float P029[3] = {        -152.21,        -304.84,        2858.68 };
  134. static float P030[3] = {         -46.36,        -475.52,        3000.00 };
  135. static float P031[3] = {          46.35,        -475.53,        3000.00 };
  136. static float P032[3] = {         155.64,        -304.87,        2863.50 };
  137. static float P033[3] = {          90.00,           0.00,        4000.00 };
  138. static float P034[3] = {          72.81,         176.33,        4000.00 };
  139. static float P035[3] = {          27.81,         285.32,        4000.00 };
  140. static float P036[3] = {         -27.81,         285.32,        4000.00 };
  141. static float P037[3] = {         -72.81,         176.34,        4000.00 };
  142. static float P038[3] = {         -90.00,           0.00,        4000.00 };
  143. static float P039[3] = {         -72.81,        -176.33,        4000.00 };
  144. static float P040[3] = {         -27.81,        -285.31,        4000.00 };
  145. static float P041[3] = {          27.81,        -285.32,        4000.00 };
  146. static float P042[3] = {          72.81,        -176.34,        4000.00 };
  147. static float P043[3] = {          30.00,           0.00,        5000.00 };
  148. static float P044[3] = {          24.27,          58.78,        5000.00 };
  149. static float P045[3] = {           9.27,          95.11,        5000.00 };
  150. static float P046[3] = {          -9.27,          95.11,        5000.00 };
  151. static float P047[3] = {         -24.27,          58.78,        5000.00 };
  152. static float P048[3] = {         -30.00,           0.00,        5000.00 };
  153. static float P049[3] = {         -24.27,         -58.78,        5000.00 };
  154. static float P050[3] = {          -9.27,         -95.10,        5000.00 };
  155. static float P051[3] = {           9.27,         -95.11,        5000.00 };
  156. static float P052[3] = {          24.27,         -58.78,        5000.00 };
  157. static float P053[3] = {           0.00,           0.00,           0.00 };
  158. static float P054[3] = {           0.00,           0.00,           0.00 };
  159. static float P055[3] = {           0.00,           0.00,           0.00 };
  160. static float P056[3] = {           0.00,           0.00,           0.00 };
  161. static float P057[3] = {           0.00,           0.00,           0.00 };
  162. static float P058[3] = {           0.00,        1212.72,        2703.08 };
  163. static float P059[3] = {          50.36,           0.00,         108.14 };
  164. static float P060[3] = {         -22.18,           0.00,         108.14 };
  165. static float P061[3] = {           0.00,        1181.61,        6344.65 };
  166. static float P062[3] = {         516.45,        -887.08,        2535.45 };
  167. static float P063[3] = {        -545.69,        -879.31,        2555.63 };
  168. static float P064[3] = {         618.89,       -1005.64,        2988.32 };
  169. static float P065[3] = {        -635.37,       -1014.79,        2938.68 };
  170. static float P066[3] = {           0.00,        1374.43,        3064.18 };
  171. static float P067[3] = {         158.49,         -11.89,        1401.56 };
  172. static float P068[3] = {        -132.08,         -17.90,        1394.31 };
  173. static float P069[3] = {           0.00,        -418.25,        5765.04 };
  174. static float P070[3] = {           0.00,        1266.91,        6629.60 };
  175. static float P071[3] = {        -139.12,        -124.96,         997.98 };
  176. static float P072[3] = {        -139.24,        -110.18,        1020.68 };
  177. static float P073[3] = {        -137.33,         -94.52,        1022.63 };
  178. static float P074[3] = {        -137.03,         -79.91,         996.89 };
  179. static float P075[3] = {        -135.21,         -91.48,         969.14 };
  180. static float P076[3] = {        -135.39,        -110.87,         968.76 };
  181. static float P077[3] = {         150.23,         -78.44,         995.53 };
  182. static float P078[3] = {         152.79,         -92.76,        1018.46 };
  183. static float P079[3] = {         154.19,        -110.20,        1020.55 };
  184. static float P080[3] = {         151.33,        -124.15,         993.77 };
  185. static float P081[3] = {         150.49,        -111.19,         969.86 };
  186. static float P082[3] = {         150.79,         -92.41,         969.70 };
  187. static float iP002[3] = {           0.00,         -36.59,        5687.72 };
  188. static float iP004[3] = {          58.24,        -146.84,         262.35 };
  189. static float iP007[3] = {         -46.09,        -146.83,         265.84 };
  190. static float iP010[3] = {         -27.81,        -285.31,         500.00 };
  191. static float iP011[3] = {          27.81,        -285.32,         500.00 };
  192. static float iP023[3] = {         150.00,           0.00,        3000.00 };
  193. static float iP024[3] = {         121.35,         293.89,        3000.00 };
  194. static float iP025[3] = {          46.35,         502.93,        2883.09 };
  195. static float iP026[3] = {         -46.35,         497.45,        2877.24 };
  196. static float iP027[3] = {        -121.35,         293.90,        3000.00 };
  197. static float iP028[3] = {        -150.00,           0.00,        3000.00 };
  198. static float iP029[3] = {        -121.35,        -304.84,        2853.86 };
  199. static float iP030[3] = {         -46.36,        -475.52,        3000.00 };
  200. static float iP031[3] = {          46.35,        -475.53,        3000.00 };
  201. static float iP032[3] = {         121.35,        -304.87,        2853.86 };
  202. static float iP033[3] = {          90.00,           0.00,        4000.00 };
  203. static float iP034[3] = {          72.81,         176.33,        4000.00 };
  204. static float iP035[3] = {          27.81,         285.32,        4000.00 };
  205. static float iP036[3] = {         -27.81,         285.32,        4000.00 };
  206. static float iP037[3] = {         -72.81,         176.34,        4000.00 };
  207. static float iP038[3] = {         -90.00,           0.00,        4000.00 };
  208. static float iP039[3] = {         -72.81,        -176.33,        4000.00 };
  209. static float iP040[3] = {         -27.81,        -285.31,        4000.00 };
  210. static float iP041[3] = {          27.81,        -285.32,        4000.00 };
  211. static float iP042[3] = {          72.81,        -176.34,        4000.00 };
  212. static float iP043[3] = {          30.00,           0.00,        5000.00 };
  213. static float iP044[3] = {          24.27,          58.78,        5000.00 };
  214. static float iP045[3] = {           9.27,          95.11,        5000.00 };
  215. static float iP046[3] = {          -9.27,          95.11,        5000.00 };
  216. static float iP047[3] = {         -24.27,          58.78,        5000.00 };
  217. static float iP048[3] = {         -30.00,           0.00,        5000.00 };
  218. static float iP049[3] = {         -24.27,         -58.78,        5000.00 };
  219. static float iP050[3] = {          -9.27,         -95.10,        5000.00 };
  220. static float iP051[3] = {           9.27,         -95.11,        5000.00 };
  221. static float iP052[3] = {          24.27,         -58.78,        5000.00 };
  222. static float iP053[3] = {           0.00,           0.00,           0.00 };
  223. static float iP061[3] = {           0.00,        1181.61,        6344.65 };
  224. static float iP069[3] = {           0.00,        -418.25,        5765.04 };
  225. static float iP070[3] = {           0.00,        1266.91,        6629.60 };
  226.  
  227. fish001()
  228. {
  229.     bgnpolygon();
  230.     n3f( N005);
  231.     v3f( P005);
  232.     n3f( N059);
  233.     v3f( P059);
  234.     n3f( N060);
  235.     v3f( P060);
  236.     n3f( N006);
  237.     v3f( P006);
  238.     endpolygon();
  239.     bgnpolygon();
  240.     n3f( N015);
  241.     v3f( P015);
  242.     n3f( N005);
  243.     v3f( P005);
  244.     n3f( N006);
  245.     v3f( P006);
  246.     n3f( N016);
  247.     v3f( P016);
  248.     endpolygon();
  249.     bgnpolygon();
  250.     n3f( N006);
  251.     v3f( P006);
  252.     n3f( N060);
  253.     v3f( P060);
  254.     n3f( N008);
  255.     v3f( P008);
  256.     endpolygon();
  257.     bgnpolygon();
  258.     n3f( N016);
  259.     v3f( P016);
  260.     n3f( N006);
  261.     v3f( P006);
  262.     n3f( N008);
  263.     v3f( P008);
  264.     endpolygon();
  265.     bgnpolygon();
  266.     n3f( N016);
  267.     v3f( P016);
  268.     n3f( N008);
  269.     v3f( P008);
  270.     n3f( N017);
  271.     v3f( P017);
  272.     endpolygon();
  273.     bgnpolygon();
  274.     n3f( N017);
  275.     v3f( P017);
  276.     n3f( N008);
  277.     v3f( P008);
  278.     n3f( N018);
  279.     v3f( P018);
  280.     endpolygon();
  281.     bgnpolygon();
  282.     n3f( N008);
  283.     v3f( P008);
  284.     n3f( N009);
  285.     v3f( P009);
  286.     n3f( N018);
  287.     v3f( P018);
  288.     endpolygon();
  289.     bgnpolygon();
  290.     n3f( N008);
  291.     v3f( P008);
  292.     n3f( N060);
  293.     v3f( P060);
  294.     n3f( N009);
  295.     v3f( P009);
  296.     endpolygon();
  297.     bgnpolygon();
  298.     n3f( N007);
  299.     v3f( P007);
  300.     n3f( N010);
  301.     v3f( P010);
  302.     n3f( N009);
  303.     v3f( P009);
  304.     endpolygon();
  305.     bgnpolygon();
  306.     n3f( N009);
  307.     v3f( P009);
  308.     n3f( N019);
  309.     v3f( P019);
  310.     n3f( N018);
  311.     v3f( P018);
  312.     endpolygon();
  313.     bgnpolygon();
  314.     n3f( N009);
  315.     v3f( P009);
  316.     n3f( N010);
  317.     v3f( P010);
  318.     n3f( N019);
  319.     v3f( P019);
  320.     endpolygon();
  321.     bgnpolygon();
  322.     n3f( N010);
  323.     v3f( P010);
  324.     n3f( N020);
  325.     v3f( P020);
  326.     n3f( N019);
  327.     v3f( P019);
  328.     endpolygon();
  329.     bgnpolygon();
  330.     n3f( N010);
  331.     v3f( P010);
  332.     n3f( N011);
  333.     v3f( P011);
  334.     n3f( N021);
  335.     v3f( P021);
  336.     n3f( N020);
  337.     v3f( P020);
  338.     endpolygon();
  339.     bgnpolygon();
  340.     n3f( N004);
  341.     v3f( P004);
  342.     n3f( N011);
  343.     v3f( P011);
  344.     n3f( N010);
  345.     v3f( P010);
  346.     n3f( N007);
  347.     v3f( P007);
  348.     endpolygon();
  349.     bgnpolygon();
  350.     n3f( N004);
  351.     v3f( P004);
  352.     n3f( N012);
  353.     v3f( P012);
  354.     n3f( N011);
  355.     v3f( P011);
  356.     endpolygon();
  357.     bgnpolygon();
  358.     n3f( N012);
  359.     v3f( P012);
  360.     n3f( N022);
  361.     v3f( P022);
  362.     n3f( N011);
  363.     v3f( P011);
  364.     endpolygon();
  365.     bgnpolygon();
  366.     n3f( N011);
  367.     v3f( P011);
  368.     n3f( N022);
  369.     v3f( P022);
  370.     n3f( N021);
  371.     v3f( P021);
  372.     endpolygon();
  373.     bgnpolygon();
  374.     n3f( N059);
  375.     v3f( P059);
  376.     n3f( N005);
  377.     v3f( P005);
  378.     n3f( N015);
  379.     v3f( P015);
  380.     endpolygon();
  381.     bgnpolygon();
  382.     n3f( N015);
  383.     v3f( P015);
  384.     n3f( N014);
  385.     v3f( P014);
  386.     n3f( N003);
  387.     v3f( P003);
  388.     endpolygon();
  389.     bgnpolygon();
  390.     n3f( N015);
  391.     v3f( P015);
  392.     n3f( N003);
  393.     v3f( P003);
  394.     n3f( N059);
  395.     v3f( P059);
  396.     endpolygon();
  397.     bgnpolygon();
  398.     n3f( N014);
  399.     v3f( P014);
  400.     n3f( N013);
  401.     v3f( P013);
  402.     n3f( N003);
  403.     v3f( P003);
  404.     endpolygon();
  405.     bgnpolygon();
  406.     n3f( N003);
  407.     v3f( P003);
  408.     n3f( N012);
  409.     v3f( P012);
  410.     n3f( N059);
  411.     v3f( P059);
  412.     endpolygon();
  413.     bgnpolygon();
  414.     n3f( N013);
  415.     v3f( P013);
  416.     n3f( N012);
  417.     v3f( P012);
  418.     n3f( N003);
  419.     v3f( P003);
  420.     endpolygon();
  421.     bgnpolygon();
  422.     n3f( N013);
  423.     v3f( P013);
  424.     n3f( N022);
  425.     v3f( P022);
  426.     n3f( N012);
  427.     v3f( P012);
  428.     endpolygon();
  429.     lmbind(LMODEL,0);
  430.     cpack(0);
  431.     bgnpolygon();
  432.     v3f( P071);
  433.     v3f( P072);
  434.     v3f( P073);
  435.     v3f( P074);
  436.     v3f( P075);
  437.     v3f( P076);
  438.     endpolygon();
  439.     bgnpolygon();
  440.     v3f( P077);
  441.     v3f( P078);
  442.     v3f( P079);
  443.     v3f( P080);
  444.     v3f( P081);
  445.     v3f( P082);
  446.     endpolygon();
  447.     lmbind(LMODEL,1);
  448. }
  449.  
  450. fish002()
  451. {
  452.     bgnpolygon();
  453.     n3f( N013);
  454.     v3f( P013);
  455.     n3f( N014);
  456.     v3f( P014);
  457.     n3f( N024);
  458.     v3f( P024);
  459.     n3f( N023);
  460.     v3f( P023);
  461.     endpolygon();
  462.     bgnpolygon();
  463.     n3f( N014);
  464.     v3f( P014);
  465.     n3f( N015);
  466.     v3f( P015);
  467.     n3f( N025);
  468.     v3f( P025);
  469.     n3f( N024);
  470.     v3f( P024);
  471.     endpolygon();
  472.     bgnpolygon();
  473.     n3f( N016);
  474.     v3f( P016);
  475.     n3f( N017);
  476.     v3f( P017);
  477.     n3f( N027);
  478.     v3f( P027);
  479.     n3f( N026);
  480.     v3f( P026);
  481.     endpolygon();
  482.     bgnpolygon();
  483.     n3f( N017);
  484.     v3f( P017);
  485.     n3f( N018);
  486.     v3f( P018);
  487.     n3f( N028);
  488.     v3f( P028);
  489.     n3f( N027);
  490.     v3f( P027);
  491.     endpolygon();
  492.     bgnpolygon();
  493.     n3f( N020);
  494.     v3f( P020);
  495.     n3f( N021);
  496.     v3f( P021);
  497.     n3f( N031);
  498.     v3f( P031);
  499.     n3f( N030);
  500.     v3f( P030);
  501.     endpolygon();
  502.     bgnpolygon();
  503.     n3f( N013);
  504.     v3f( P013);
  505.     n3f( N023);
  506.     v3f( P023);
  507.     n3f( N022);
  508.     v3f( P022);
  509.     endpolygon();
  510.     bgnpolygon();
  511.     n3f( N022);
  512.     v3f( P022);
  513.     n3f( N023);
  514.     v3f( P023);
  515.     n3f( N032);
  516.     v3f( P032);
  517.     endpolygon();
  518.     bgnpolygon();
  519.     n3f( N022);
  520.     v3f( P022);
  521.     n3f( N032);
  522.     v3f( P032);
  523.     n3f( N031);
  524.     v3f( P031);
  525.     endpolygon();
  526.     bgnpolygon();
  527.     n3f( N022);
  528.     v3f( P022);
  529.     n3f( N031);
  530.     v3f( P031);
  531.     n3f( N021);
  532.     v3f( P021);
  533.     endpolygon();
  534.     bgnpolygon();
  535.     n3f( N018);
  536.     v3f( P018);
  537.     n3f( N019);
  538.     v3f( P019);
  539.     n3f( N029);
  540.     v3f( P029);
  541.     endpolygon();
  542.     bgnpolygon();
  543.     n3f( N018);
  544.     v3f( P018);
  545.     n3f( N029);
  546.     v3f( P029);
  547.     n3f( N028);
  548.     v3f( P028);
  549.     endpolygon();
  550.     bgnpolygon();
  551.     n3f( N019);
  552.     v3f( P019);
  553.     n3f( N020);
  554.     v3f( P020);
  555.     n3f( N030);
  556.     v3f( P030);
  557.     endpolygon();
  558.     bgnpolygon();
  559.     n3f( N019);
  560.     v3f( P019);
  561.     n3f( N030);
  562.     v3f( P030);
  563.     n3f( N029);
  564.     v3f( P029);
  565.     endpolygon();
  566. }
  567.  
  568. fish003()
  569. {
  570.     bgnpolygon();
  571.     n3f( N032);
  572.     v3f( P032);
  573.     n3f( N023);
  574.     v3f( P023);
  575.     n3f( N033);
  576.     v3f( P033);
  577.     n3f( N042);
  578.     v3f( P042);
  579.     endpolygon();
  580.     bgnpolygon();
  581.     n3f( N031);
  582.     v3f( P031);
  583.     n3f( N032);
  584.     v3f( P032);
  585.     n3f( N042);
  586.     v3f( P042);
  587.     n3f( N041);
  588.     v3f( P041);
  589.     endpolygon();
  590.     bgnpolygon();
  591.     n3f( N023);
  592.     v3f( P023);
  593.     n3f( N024);
  594.     v3f( P024);
  595.     n3f( N034);
  596.     v3f( P034);
  597.     n3f( N033);
  598.     v3f( P033);
  599.     endpolygon();
  600.     bgnpolygon();
  601.     n3f( N024);
  602.     v3f( P024);
  603.     n3f( N025);
  604.     v3f( P025);
  605.     n3f( N035);
  606.     v3f( P035);
  607.     n3f( N034);
  608.     v3f( P034);
  609.     endpolygon();
  610.     bgnpolygon();
  611.     n3f( N030);
  612.     v3f( P030);
  613.     n3f( N031);
  614.     v3f( P031);
  615.     n3f( N041);
  616.     v3f( P041);
  617.     n3f( N040);
  618.     v3f( P040);
  619.     endpolygon();
  620.     bgnpolygon();
  621.     n3f( N025);
  622.     v3f( P025);
  623.     n3f( N026);
  624.     v3f( P026);
  625.     n3f( N036);
  626.     v3f( P036);
  627.     n3f( N035);
  628.     v3f( P035);
  629.     endpolygon();
  630.     bgnpolygon();
  631.     n3f( N026);
  632.     v3f( P026);
  633.     n3f( N027);
  634.     v3f( P027);
  635.     n3f( N037);
  636.     v3f( P037);
  637.     n3f( N036);
  638.     v3f( P036);
  639.     endpolygon();
  640.     bgnpolygon();
  641.     n3f( N027);
  642.     v3f( P027);
  643.     n3f( N028);
  644.     v3f( P028);
  645.     n3f( N038);
  646.     v3f( P038);
  647.     n3f( N037);
  648.     v3f( P037);
  649.     endpolygon();
  650.     bgnpolygon();
  651.     n3f( N028);
  652.     v3f( P028);
  653.     n3f( N029);
  654.     v3f( P029);
  655.     n3f( N039);
  656.     v3f( P039);
  657.     n3f( N038);
  658.     v3f( P038);
  659.     endpolygon();
  660.     bgnpolygon();
  661.     n3f( N029);
  662.     v3f( P029);
  663.     n3f( N030);
  664.     v3f( P030);
  665.     n3f( N040);
  666.     v3f( P040);
  667.     n3f( N039);
  668.     v3f( P039);
  669.     endpolygon();
  670. }
  671.  
  672. fish004()
  673. {
  674.     bgnpolygon();
  675.     n3f( N040);
  676.     v3f( P040);
  677.     n3f( N041);
  678.     v3f( P041);
  679.     n3f( N051);
  680.     v3f( P051);
  681.     n3f( N050);
  682.     v3f( P050);
  683.     endpolygon();
  684.     bgnpolygon();
  685.     n3f( N041);
  686.     v3f( P041);
  687.     n3f( N042);
  688.     v3f( P042);
  689.     n3f( N052);
  690.     v3f( P052);
  691.     n3f( N051);
  692.     v3f( P051);
  693.     endpolygon();
  694.     bgnpolygon();
  695.     n3f( N042);
  696.     v3f( P042);
  697.     n3f( N033);
  698.     v3f( P033);
  699.     n3f( N043);
  700.     v3f( P043);
  701.     n3f( N052);
  702.     v3f( P052);
  703.     endpolygon();
  704.     bgnpolygon();
  705.     n3f( N033);
  706.     v3f( P033);
  707.     n3f( N034);
  708.     v3f( P034);
  709.     n3f( N044);
  710.     v3f( P044);
  711.     n3f( N043);
  712.     v3f( P043);
  713.     endpolygon();
  714.     bgnpolygon();
  715.     n3f( N034);
  716.     v3f( P034);
  717.     n3f( N035);
  718.     v3f( P035);
  719.     n3f( N045);
  720.     v3f( P045);
  721.     n3f( N044);
  722.     v3f( P044);
  723.     endpolygon();
  724.     bgnpolygon();
  725.     n3f( N035);
  726.     v3f( P035);
  727.     n3f( N036);
  728.     v3f( P036);
  729.     n3f( N046);
  730.     v3f( P046);
  731.     n3f( N045);
  732.     v3f( P045);
  733.     endpolygon();
  734.     bgnpolygon();
  735.     n3f( N036);
  736.     v3f( P036);
  737.     n3f( N037);
  738.     v3f( P037);
  739.     n3f( N047);
  740.     v3f( P047);
  741.     n3f( N046);
  742.     v3f( P046);
  743.     endpolygon();
  744.     bgnpolygon();
  745.     n3f( N037);
  746.     v3f( P037);
  747.     n3f( N038);
  748.     v3f( P038);
  749.     n3f( N048);
  750.     v3f( P048);
  751.     n3f( N047);
  752.     v3f( P047);
  753.     endpolygon();
  754.     bgnpolygon();
  755.     n3f( N038);
  756.     v3f( P038);
  757.     n3f( N039);
  758.     v3f( P039);
  759.     n3f( N049);
  760.     v3f( P049);
  761.     n3f( N048);
  762.     v3f( P048);
  763.     endpolygon();
  764.     bgnpolygon();
  765.     n3f( N039);
  766.     v3f( P039);
  767.     n3f( N040);
  768.     v3f( P040);
  769.     n3f( N050);
  770.     v3f( P050);
  771.     n3f( N049);
  772.     v3f( P049);
  773.     endpolygon();
  774.     bgnpolygon();
  775.     n3f( N070);
  776.     v3f( P070);
  777.     n3f( N061);
  778.     v3f( P061);
  779.     n3f( N002);
  780.     v3f( P002);
  781.     endpolygon();
  782.     bgnpolygon();
  783.     n3f( N061);
  784.     v3f( P061);
  785.     n3f( N046);
  786.     v3f( P046);
  787.     n3f( N002);
  788.     v3f( P002);
  789.     endpolygon();
  790.     bgnpolygon();
  791.     n3f( N045);
  792.     v3f( P045);
  793.     n3f( N046);
  794.     v3f( P046);
  795.     n3f( N061);
  796.     v3f( P061);
  797.     endpolygon();
  798.     bgnpolygon();
  799.     n3f( N002);
  800.     v3f( P002);
  801.     n3f( N061);
  802.     v3f( P061);
  803.     n3f( N070);
  804.     v3f( P070);
  805.     endpolygon();
  806.     bgnpolygon();
  807.     n3f( N002);
  808.     v3f( P002);
  809.     n3f( N045);
  810.     v3f( P045);
  811.     n3f( N061);
  812.     v3f( P061);
  813.     endpolygon();
  814. }
  815.  
  816. fish005()
  817. {
  818.     bgnpolygon();
  819.     n3f( N002);
  820.     v3f( P002);
  821.     n3f( N044);
  822.     v3f( P044);
  823.     n3f( N045);
  824.     v3f( P045);
  825.     endpolygon();
  826.     bgnpolygon();
  827.     n3f( N002);
  828.     v3f( P002);
  829.     n3f( N043);
  830.     v3f( P043);
  831.     n3f( N044);
  832.     v3f( P044);
  833.     endpolygon();
  834.     bgnpolygon();
  835.     n3f( N002);
  836.     v3f( P002);
  837.     n3f( N052);
  838.     v3f( P052);
  839.     n3f( N043);
  840.     v3f( P043);
  841.     endpolygon();
  842.     bgnpolygon();
  843.     n3f( N002);
  844.     v3f( P002);
  845.     n3f( N051);
  846.     v3f( P051);
  847.     n3f( N052);
  848.     v3f( P052);
  849.     endpolygon();
  850.     bgnpolygon();
  851.     n3f( N002);
  852.     v3f( P002);
  853.     n3f( N046);
  854.     v3f( P046);
  855.     n3f( N047);
  856.     v3f( P047);
  857.     endpolygon();
  858.     bgnpolygon();
  859.     n3f( N002);
  860.     v3f( P002);
  861.     n3f( N047);
  862.     v3f( P047);
  863.     n3f( N048);
  864.     v3f( P048);
  865.     endpolygon();
  866.     bgnpolygon();
  867.     n3f( N002);
  868.     v3f( P002);
  869.     n3f( N048);
  870.     v3f( P048);
  871.     n3f( N049);
  872.     v3f( P049);
  873.     endpolygon();
  874.     bgnpolygon();
  875.     n3f( N002);
  876.     v3f( P002);
  877.     n3f( N049);
  878.     v3f( P049);
  879.     n3f( N050);
  880.     v3f( P050);
  881.     endpolygon();
  882.     bgnpolygon();
  883.     n3f( N050);
  884.     v3f( P050);
  885.     n3f( N051);
  886.     v3f( P051);
  887.     n3f( N069);
  888.     v3f( P069);
  889.     endpolygon();
  890.     bgnpolygon();
  891.     n3f( N051);
  892.     v3f( P051);
  893.     n3f( N002);
  894.     v3f( P002);
  895.     n3f( N069);
  896.     v3f( P069);
  897.     endpolygon();
  898.     bgnpolygon();
  899.     n3f( N050);
  900.     v3f( P050);
  901.     n3f( N069);
  902.     v3f( P069);
  903.     n3f( N002);
  904.     v3f( P002);
  905.     endpolygon();
  906. }
  907.  
  908. fish006()
  909. {
  910.     bgnpolygon();
  911.     n3f( N066);
  912.     v3f( P066);
  913.     n3f( N016);
  914.     v3f( P016);
  915.     n3f( N026);
  916.     v3f( P026);
  917.     endpolygon();
  918.     bgnpolygon();
  919.     n3f( N015);
  920.     v3f( P015);
  921.     n3f( N066);
  922.     v3f( P066);
  923.     n3f( N025);
  924.     v3f( P025);
  925.     endpolygon();
  926.     bgnpolygon();
  927.     n3f( N025);
  928.     v3f( P025);
  929.     n3f( N066);
  930.     v3f( P066);
  931.     n3f( N026);
  932.     v3f( P026);
  933.     endpolygon();
  934.     bgnpolygon();
  935.     n3f( N066);
  936.     v3f( P066);
  937.     n3f( N058);
  938.     v3f( P058);
  939.     n3f( N016);
  940.     v3f( P016);
  941.     endpolygon();
  942.     bgnpolygon();
  943.     n3f( N015);
  944.     v3f( P015);
  945.     n3f( N058);
  946.     v3f( P058);
  947.     n3f( N066);
  948.     v3f( P066);
  949.     endpolygon();
  950.     bgnpolygon();
  951.     n3f( N058);
  952.     v3f( P058);
  953.     n3f( N015);
  954.     v3f( P015);
  955.     n3f( N016);
  956.     v3f( P016);
  957.     endpolygon();
  958. }
  959.  
  960. fish007()
  961. {
  962.     bgnpolygon();
  963.     n3f( N062);
  964.     v3f( P062);
  965.     n3f( N022);
  966.     v3f( P022);
  967.     n3f( N032);
  968.     v3f( P032);
  969.     endpolygon();
  970.     bgnpolygon();
  971.     n3f( N062);
  972.     v3f( P062);
  973.     n3f( N032);
  974.     v3f( P032);
  975.     n3f( N064);
  976.     v3f( P064);
  977.     endpolygon();
  978.     bgnpolygon();
  979.     n3f( N022);
  980.     v3f( P022);
  981.     n3f( N062);
  982.     v3f( P062);
  983.     n3f( N032);
  984.     v3f( P032);
  985.     endpolygon();
  986.     bgnpolygon();
  987.     n3f( N062);
  988.     v3f( P062);
  989.     n3f( N064);
  990.     v3f( P064);
  991.     n3f( N032);
  992.     v3f( P032);
  993.     endpolygon();
  994. }
  995.  
  996. fish008()
  997. {
  998.     bgnpolygon();
  999.     n3f( N063);
  1000.     v3f( P063);
  1001.     n3f( N019);
  1002.     v3f( P019);
  1003.     n3f( N029);
  1004.     v3f( P029);
  1005.     endpolygon();
  1006.     bgnpolygon();
  1007.     n3f( N019);
  1008.     v3f( P019);
  1009.     n3f( N063);
  1010.     v3f( P063);
  1011.     n3f( N029);
  1012.     v3f( P029);
  1013.     endpolygon();
  1014.     bgnpolygon();
  1015.     n3f( N063);
  1016.     v3f( P063);
  1017.     n3f( N029);
  1018.     v3f( P029);
  1019.     n3f( N065);
  1020.     v3f( P065);
  1021.     endpolygon();
  1022.     bgnpolygon();
  1023.     n3f( N063);
  1024.     v3f( P063);
  1025.     n3f( N065);
  1026.     v3f( P065);
  1027.     n3f( N029);
  1028.     v3f( P029);
  1029.     endpolygon();
  1030. }
  1031.  
  1032. fish009()
  1033. {
  1034.     lmbind(LMODEL,0);
  1035.     cpack(0xFF000000);
  1036.     bgnpolygon();
  1037.     v3f( P059);
  1038.     v3f( P012);
  1039.     v3f( P009);
  1040.     v3f( P060);
  1041.     endpolygon();
  1042.     bgnpolygon();
  1043.     v3f( P012);
  1044.     v3f( P004);
  1045.     v3f( P007);
  1046.     v3f( P009);
  1047.     endpolygon();
  1048.     lmbind(LMODEL,1);
  1049. }
  1050.  
  1051. fish_1()
  1052. {
  1053.     fish004();                                                  
  1054.     fish005();                                                  
  1055.     fish003();                                                  
  1056.     fish007();                                                  
  1057.     fish006();                                                  
  1058.     fish002();                                                  
  1059.     fish008();                                                  
  1060.     fish009();                                                  
  1061.     fish001();                                                  
  1062. }
  1063.  
  1064. fish_2()
  1065. {
  1066.     fish005();                                                  
  1067.     fish004();                                                  
  1068.     fish003();                                                  
  1069.     fish008();                                                  
  1070.     fish006();                                                  
  1071.     fish002();                                                  
  1072.     fish007();                                                  
  1073.     fish009();                                                  
  1074.     fish001();                                                  
  1075. }
  1076.  
  1077. fish_3()
  1078. {
  1079.     fish005();                                                  
  1080.     fish004();                                                  
  1081.     fish007();                                                  
  1082.     fish003();                                                  
  1083.     fish002();                                                  
  1084.     fish008();                                                  
  1085.     fish009();                                                  
  1086.     fish001();                                                  
  1087.     fish006();                                                  
  1088. }
  1089.  
  1090. fish_4()
  1091. {
  1092.     fish005();                                                  
  1093.     fish004();                                                  
  1094.     fish008();                                                  
  1095.     fish003();                                                  
  1096.     fish002();                                                  
  1097.     fish007();                                                  
  1098.     fish009();                                                  
  1099.     fish001();                                                  
  1100.     fish006();                                                  
  1101. }
  1102.  
  1103. fish_5()
  1104. {
  1105.     fish009();                                                  
  1106.     fish006();                                                  
  1107.     fish007();                                                  
  1108.     fish001();                                                  
  1109.     fish002();                                                  
  1110.     fish003();                                                  
  1111.     fish008();                                                  
  1112.     fish004();                                                  
  1113.     fish005();                                                  
  1114. }
  1115.  
  1116. fish_6()
  1117. {
  1118.     fish009();                                                  
  1119.     fish006();                                                  
  1120.     fish008();                                                  
  1121.     fish001();                                                  
  1122.     fish002();                                                  
  1123.     fish007();                                                  
  1124.     fish003();                                                  
  1125.     fish004();                                                  
  1126.     fish005();                                                  
  1127. }
  1128.  
  1129. fish_7()
  1130. {
  1131.     fish009();                                                  
  1132.     fish001();                                                  
  1133.     fish007();                                                  
  1134.     fish005();                                                  
  1135.     fish002();                                                  
  1136.     fish008();                                                  
  1137.     fish003();                                                  
  1138.     fish004();                                                  
  1139.     fish006();                                                  
  1140. }
  1141.  
  1142. fish_8()
  1143. {
  1144.     fish009();                                                  
  1145.     fish008();                                                  
  1146.     fish001();                                                  
  1147.     fish002();                                                  
  1148.     fish007();                                                  
  1149.     fish003();                                                  
  1150.     fish005();                                                  
  1151.     fish004();                                                  
  1152.     fish006();                                                  
  1153. }
  1154.  
  1155. int phi;
  1156. float seg1,seg2,seg3,seg4,segup;
  1157. draw_shark(struct fish *pfish) 
  1158. {
  1159.     int n;
  1160.     Matrix MAT;
  1161.     float thrash,chomp;
  1162.  
  1163.     pfish->htail = (int)(pfish->htail - (int)(5. * pfish->v)) % 360;
  1164.  
  1165.     thrash = 50. * pfish->v;
  1166.  
  1167.     seg1 = .6 * thrash * fsin( pfish->htail         * RRAD);
  1168.     seg2 = 1.8 * thrash * fsin((pfish->htail + 45.)  * RRAD);
  1169.     seg3 = 3.0 * thrash * fsin((pfish->htail + 90.)  * RRAD);
  1170.     seg4 = 4.0 * thrash * fsin((pfish->htail + 110.) * RRAD);
  1171.  
  1172.     if(pfish->v > 2.0) chomp = - (pfish->v - 2.0) * 200.0;
  1173.  
  1174.     P004[1] = iP004[1] + chomp; 
  1175.     P007[1] = iP007[1] + chomp; 
  1176.     P010[1] = iP010[1] + chomp; 
  1177.     P011[1] = iP011[1] + chomp; 
  1178.  
  1179.     P023[0] = iP023[0] + seg1; 
  1180.     P024[0] = iP024[0] + seg1; 
  1181.     P025[0] = iP025[0] + seg1; 
  1182.     P026[0] = iP026[0] + seg1; 
  1183.     P027[0] = iP027[0] + seg1; 
  1184.     P028[0] = iP028[0] + seg1; 
  1185.     P029[0] = iP029[0] + seg1; 
  1186.     P030[0] = iP030[0] + seg1; 
  1187.     P031[0] = iP031[0] + seg1; 
  1188.     P032[0] = iP032[0] + seg1; 
  1189.     P033[0] = iP033[0] + seg2; 
  1190.     P034[0] = iP034[0] + seg2; 
  1191.     P035[0] = iP035[0] + seg2; 
  1192.     P036[0] = iP036[0] + seg2; 
  1193.     P037[0] = iP037[0] + seg2; 
  1194.     P038[0] = iP038[0] + seg2; 
  1195.     P039[0] = iP039[0] + seg2; 
  1196.     P040[0] = iP040[0] + seg2; 
  1197.     P041[0] = iP041[0] + seg2; 
  1198.     P042[0] = iP042[0] + seg2; 
  1199.     P043[0] = iP043[0] + seg3; 
  1200.     P044[0] = iP044[0] + seg3; 
  1201.     P045[0] = iP045[0] + seg3; 
  1202.     P046[0] = iP046[0] + seg3; 
  1203.     P047[0] = iP047[0] + seg3; 
  1204.     P048[0] = iP048[0] + seg3; 
  1205.     P049[0] = iP049[0] + seg3; 
  1206.     P050[0] = iP050[0] + seg3; 
  1207.     P051[0] = iP051[0] + seg3; 
  1208.     P052[0] = iP052[0] + seg3; 
  1209.     P002[0] = iP002[0] + seg4; 
  1210.     P061[0] = iP061[0] + seg4; 
  1211.     P069[0] = iP069[0] + seg4; 
  1212.     P070[0] = iP070[0] + seg4;
  1213.  
  1214.     pfish->vtail += ((pfish->dtheta - pfish->vtail) * 0.1);
  1215.  
  1216.     if  (pfish->vtail >  0.5) pfish->vtail = 0.5;
  1217.     else if (pfish->vtail < -0.5) pfish->vtail = -0.5;
  1218.  
  1219.  
  1220.     segup = thrash * pfish->vtail;
  1221.  
  1222.     P023[1] = iP023[1] + segup; 
  1223.     P024[1] = iP024[1] + segup; 
  1224.     P025[1] = iP025[1] + segup; 
  1225.     P026[1] = iP026[1] + segup; 
  1226.     P027[1] = iP027[1] + segup; 
  1227.     P028[1] = iP028[1] + segup; 
  1228.     P029[1] = iP029[1] + segup; 
  1229.     P030[1] = iP030[1] + segup; 
  1230.     P031[1] = iP031[1] + segup; 
  1231.     P032[1] = iP032[1] + segup; 
  1232.     P033[1] = iP033[1] + segup * 5.; 
  1233.     P034[1] = iP034[1] + segup * 5.; 
  1234.     P035[1] = iP035[1] + segup * 5.; 
  1235.     P036[1] = iP036[1] + segup * 5.; 
  1236.     P037[1] = iP037[1] + segup * 5.; 
  1237.     P038[1] = iP038[1] + segup * 5.; 
  1238.     P039[1] = iP039[1] + segup * 5.; 
  1239.     P040[1] = iP040[1] + segup * 5.; 
  1240.     P041[1] = iP041[1] + segup * 5.; 
  1241.     P042[1] = iP042[1] + segup * 5.; 
  1242.     P043[1] = iP043[1] + segup * 12.; 
  1243.     P044[1] = iP044[1] + segup * 12.; 
  1244.     P045[1] = iP045[1] + segup * 12.; 
  1245.     P046[1] = iP046[1] + segup * 12.; 
  1246.     P047[1] = iP047[1] + segup * 12.; 
  1247.     P048[1] = iP048[1] + segup * 12.; 
  1248.     P049[1] = iP049[1] + segup * 12.; 
  1249.     P050[1] = iP050[1] + segup * 12.; 
  1250.     P051[1] = iP051[1] + segup * 12.; 
  1251.     P052[1] = iP052[1] + segup * 12.; 
  1252.     P002[1] = iP002[1] + segup * 17.; 
  1253.     P061[1] = iP061[1] + segup * 17.; 
  1254.     P069[1] = iP069[1] + segup * 17.; 
  1255.     P070[1] = iP070[1] + segup * 17.;
  1256.  
  1257.     pushmatrix();
  1258.     translate(0.,0.,-3000.);
  1259.  
  1260.     n = 0;
  1261.     getmatrix(MAT);
  1262.     if(MAT[0][2] >= 0.0) n += 1;
  1263.     if(MAT[1][2] >= 0.0) n += 2;
  1264.     if(MAT[2][2] >= 0.0) n += 4;
  1265.     backface(1);
  1266.     scale(2.0,1.0,1.0);
  1267.     switch (n) {
  1268.       case 0:
  1269.         fish_1();
  1270.         break;
  1271.       case 1:
  1272.         fish_2();
  1273.         break;
  1274.       case 2:
  1275.         fish_3();
  1276.         break;
  1277.       case 3:
  1278.         fish_4();
  1279.         break;
  1280.       case 4:
  1281.         fish_5();
  1282.         break;
  1283.       case 5:
  1284.         fish_6();
  1285.         break;
  1286.       case 6:
  1287.         fish_7();
  1288.         break;
  1289.       case 7:
  1290.         fish_8();
  1291.         break;
  1292.       default:
  1293.         break;
  1294.     }
  1295.     backface(0);
  1296.     popmatrix();
  1297. }
  1298.